package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: ProjectForReadRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-15
 * @Version: 1.0
 * Table: pear_project
 * Comment:
 * 项目表
 */
public class ProjectForReadRequestConvert extends BaseConvert {
    public static ProjectForRead convert(ProjectForReadRequest request) throws Exception {
        ProjectForRead daoRequest = new ProjectForRead();
        copyProperties(request, daoRequest);

        daoRequest.setCover(daoRequest.getCover() == null ? null : daoRequest.getCover().trim());
        daoRequest.setName(daoRequest.getName() == null ? null : daoRequest.getName().trim());
        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setAccessControlType(daoRequest.getAccessControlType() == null ? null : daoRequest.getAccessControlType().trim());
        daoRequest.setWhiteList(daoRequest.getWhiteList() == null ? null : daoRequest.getWhiteList().trim());
        daoRequest.setTemplateCode(daoRequest.getTemplateCode() == null ? null : daoRequest.getTemplateCode().trim());
        daoRequest.setCreateTime(daoRequest.getCreateTime() == null ? null : daoRequest.getCreateTime().trim());
        daoRequest.setOrganizationCode(daoRequest.getOrganizationCode() == null ? null : daoRequest.getOrganizationCode().trim());
        daoRequest.setDeletedTime(daoRequest.getDeletedTime() == null ? null : daoRequest.getDeletedTime().trim());
        daoRequest.setPrefix(daoRequest.getPrefix() == null ? null : daoRequest.getPrefix().trim());
        daoRequest.setArchiveTime(daoRequest.getArchiveTime() == null ? null : daoRequest.getArchiveTime().trim());
        daoRequest.setTaskBoardTheme(daoRequest.getTaskBoardTheme() == null ? null : daoRequest.getTaskBoardTheme().trim());
        daoRequest.setBeginTime(daoRequest.getBeginTime() == null ? null : daoRequest.getBeginTime().trim());
        daoRequest.setEndTime(daoRequest.getEndTime() == null ? null : daoRequest.getEndTime().trim());
        daoRequest.setDescription(daoRequest.getDescription() == null ? null : daoRequest.getDescription().trim());
        daoRequest.setProjectCode(daoRequest.getProjectCode() == null ? null : daoRequest.getProjectCode().trim());
        daoRequest.setAuthorize(daoRequest.getAuthorize() == null ? null : daoRequest.getAuthorize().trim());
        daoRequest.setOwnerName(daoRequest.getOwnerName() == null ? null : daoRequest.getOwnerName().trim());
        daoRequest.setOwnerAvatar(daoRequest.getOwnerAvatar() == null ? null : daoRequest.getOwnerAvatar().trim());
        daoRequest.setCollectionCreateTime(daoRequest.getCollectionCreateTime() == null ? null : daoRequest.getCollectionCreateTime().trim());
        daoRequest.setMemberCode(daoRequest.getMemberCode() == null ? null : daoRequest.getMemberCode().trim());

        return daoRequest;
    }
}
